public class numberMax {
    //设计一个方法,求数组最大值,并将最大值返回
    public static void main(String[] args) {
        int arr[] = {11,22,66,44,55};
        int max = max(arr);
        System.out.println("数组中的最大值为:" + max);
    }
    public static int max(int arr[]){
        int max = arr[0];
        for (int i = 1; i < arr.length; i++) {
            if(arr[i] <= max){
            }else{
                max = arr[i];
            }
        }

        return max;
    }


}
